package com.atguigu.srb.core;

import feign.Retryer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

//@EnableSwagger2
@SpringBootApplication
//配置启动类扫描的包:默认扫描启动类所在的包
@ComponentScan(basePackages = {"com.atguigu.srb","com.atguigu.common"})
@EnableCaching
@EnableDiscoveryClient
public class ServiceCoreApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServiceCoreApplication.class , args);
    }
//    @Bean
//    public Retryer retryer(){
//        //现在feign默认使用NEVER_RETRY 远程访问失败 不重试
////        return Retryer.NEVER_RETRY;
//        return new Retryer.Default();//默认重试5次
//    }
}
